Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README for greater consistency with styled API #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andriibieriezhnoi
Copy link

@andriibieriezhnoi andriibieriezhnoi commented Jan 3, 2019

I think it would be more convenient for users who switch from styled-components

Reference #33

for greater consistency with styled API
@ai
Copy link
Collaborator

ai commented Jan 3, 2019

Also it is a little shorter

@taion
Copy link
Contributor

taion commented Jan 3, 2019

wait this works? @jquense why don't we use this then

@ai
Copy link
Collaborator

ai commented Jan 3, 2019

@taion yeap, @jquense added this syntax to fix my old issue #33

@jquense
Copy link
Contributor

jquense commented Jan 3, 2019

I think it's less good of a syntax personally, with styled() you use the same function call for dom elements or custom components, it's also a bit less error prone.

Happy to show it in the readme but I think we should prefer the function generally

@ai
Copy link
Collaborator

ai commented Jan 3, 2019

@jquense yeap, we can do it in a different way. We just need to explain for styled components users that they do not need to change the syntax. Do you have an idea how to do it?

@ai ai closed this Jan 3, 2019
@ai ai reopened this Jan 3, 2019
@andriibieriezhnoi
Copy link
Author

@jquense
I think astroturf should attract styled/emotion users and README will show them that migrating is not so difficult. This is why I think it is important for us to use SC syntax.

@jquense
Copy link
Contributor

jquense commented Jan 3, 2019

for sure we should show it and illustrate a migration path, I just don't think we should do so at the expense of now using the other syntax at all.

Can we add a section that shows both? and/or some copy for folks coming from SC or emotion?

@ai
Copy link
Collaborator

ai commented Jan 3, 2019

Maybe it is a good time to write a special section for Migration from SC. We can cover there:

  1. Syntax difference. Show what is supported.
  2. Show workaround for keyframes and injectGlobal.
  3. Explain how to set constants (use postcss-custom-properties or postcss-env-function).
  4. How to have dynamic parts in styles (Custom Properties).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants